₹
INR
drawer
//www.shankara.in/cdn/shop/files/bgn.png?v=1726735928&width=2000
Build a box with products
#000
Create your very own GiftBox in just 4 simple steps and personalise it with your gift message. We’ve hand-selected the best products in one place to choose from . Select from the items below and fill up your
#000
on
on
40
14
on
on
on
on
on
off
#ffffff
#414402
#c48757
#ffffff
$(document).on("click", '.addtocart_btn, .accordion_img_remove, .preview_img_remove, .quantity_box_btn[data_step_type="plus"], .quantity_box_btn[data_step_type="minus"]', function () {
var data_prd_id = ($(this).attr('data_prd_id')) ? $(this).attr('data_prd_id') : $(this).attr('data-product-id');
var prdclasses = $('.product_box[data-product-id="'+data_prd_id+'"]').attr('class');
var searchString = "qeboxlimit";
var regex = new RegExp(`\\b\\w*${searchString}\\w*\\b`, "i");
var matchedString = prdclasses.match(regex);
var choose_box_limit = '';
if(matchedString){
choose_box_limit = matchedString[0].split('qeboxlimit').pop();
var hidden_step_settings = $('.hidden_step_settings[data_step_index="2"]').html();
hidden_step_settings = JSON.parse(hidden_step_settings);
hidden_step_settings['builder_step_maximum'] = Number(choose_box_limit);
hidden_step_settings['builder_step_minimum'] = Number(choose_box_limit);
hidden_step_settings = JSON.stringify(hidden_step_settings);
$('.hidden_step_settings[data_step_index="2"]').html(hidden_step_settings);
}
});
$(document).on('click','.summary_backnext_btn[data-step-type="next"]', function(){
$('.custom_add_to_cart_btn') .remove();
var add_to_cart = $('.checkout_btn_center .checkout_btn').text();
var custom_add_to_cart_btn = document.createElement("button");
custom_add_to_cart_btn.className = "custom_add_to_cart_btn";
custom_add_to_cart_btn.innerHTML = add_to_cart;
$('.checkout_btn_center .checkout_btn').after(custom_add_to_cart_btn);
});
$(document).on('click','.custom_add_to_cart_btn', function(){
var add_to_cart = $('.checkout_btn_center .checkout_btn').text();
var stepsValidationFlag = [];
var checkproductexist = false;
$.each($(".panel_bg .hidden_step_settings"), function() {
var current_active_index = $(this).attr('data_step_index');
var current_step_object = storage_object['step_'+current_active_index];
var step_selected_products = ( current_step_object && current_step_object.products ) ? current_step_object.products : [];
var step_selected_products_length = step_selected_products.reduce(function (s, a) { return s + a.product_quantity; }, 0);
var step_settings = JSON.parse($('.hidden_step_settings[data_step_index="'+current_active_index+'"]').text());
var builder_step_validation = step_settings.builder_step_validation;
var builder_step_minimum = step_settings.builder_step_minimum;
var builder_step_maximum = step_settings.builder_step_maximum;
var builder_step_type = step_settings.builder_step_type;
var builder_form_setting = step_settings.form_setting;
if(step_selected_products.length > 0){
checkproductexist = true;
}
if(builder_step_validation=='yes'){
if(builder_step_type != 'curated' && Number(step_selected_products_length) < Number(builder_step_minimum)){
stepsValidationFlag.push(current_active_index);
triggerGridActive( current_active_index );
sweetAlertPopup('error', "Step - " + current_active_index + " is required. Please select at least "+builder_step_minimum+" product!");
return false;
}
if(builder_step_type != 'curated' && Number(step_selected_products_length) > Number(builder_step_maximum)){
stepsValidationFlag.push(current_active_index);
triggerGridActive( current_active_index );
sweetAlertPopup('error', "You can only choose " + builder_step_maximum + " Products!");
return false;
}
if(builder_step_type == 'curated' && Number(step_selected_products_length) == 0){
stepsValidationFlag.push(current_active_index);
triggerGridActive( current_active_index );
sweetAlertPopup('error', "Step - " + current_active_index + " is required. Please Add product!");
return false;
}
}
if(builder_form_setting){
var builder_form_setting_array = $.map(builder_form_setting, function(value, index){
return [value];
});
$.each(builder_form_setting_array, function( key, value ) {
var formfield_index = Number(key) + Number(1);
if(value.validation_radio=='yes'){
var targetElement = $('.panel_bg[data_step_index="'+current_active_index+'"] .form-group_inr[data-formfield-index="formfield_'+formfield_index+'"]');
targetElement.find('.required-validation').remove();
var field_value = targetElement.find('.step_form_input').val();
if(field_value==''){
triggerGridActive( current_active_index );
sweetAlertPopup('error', value.field_name + " is required!");
var required_validation = document.createElement("small");
required_validation.className = "required-validation";
required_validation.innerHTML = value.field_name+' is required!';
targetElement.append(required_validation);
stepsValidationFlag.push(current_active_index);
return false;
}
}
});
}
});
if(checkproductexist == false){
triggerGridActive( 1 );
stepsValidationFlag.push(1);
sweetAlertPopup('error', "Please Add At least 1 product to checkout");
return false;
}
if($('.deliverydate_right_bg.hide').length==0){
var deliverydate_datepicker = $('.deliverydate-datepicker').val();
if(deliverydate_datepicker==''){
sweetAlertPopup('error', "Please select delivery date!");
return false;
}else{
storage_object['delivery_date'] = deliverydate_datepicker;
}
}
if(stepsValidationFlag.length==0){
var embeds_redirection_loader_image = $('.redirection_loader_image').text();
var imageUrl = (embeds_redirection_loader_image !== '') ? embeds_redirection_loader_image : 'https://www.qetail.com/apps/gbb2_0/install/images/gbb2-0-loader_new.gif';
$('.checkout_btn_center .custom_add_to_cart_btn').prop('disabled', true).html('Processing..');
$('.builder-checkout-loader-main').remove();
var loader_div = document.createElement("div");
loader_div.className = "builder-checkout-loader-main";
$('body').append(loader_div);
var loader_sub_div = document.createElement("div");
loader_sub_div.className = "builder-checkout-loader-sub";
$('.builder-checkout-loader-main').append(loader_sub_div);
var loader_sub_div_img_tag = document.createElement("img");
loader_sub_div_img_tag.className = "builder-checkout-loader-img";
loader_sub_div_img_tag.src = imageUrl;
$('.builder-checkout-loader-sub').append(loader_sub_div_img_tag);
var loader_sub_div_div = document.createElement("div");
loader_sub_div_div.className = "builder-checkout-loader-text";
$('.builder-checkout-loader-sub').append(loader_sub_div_div);
var loader_sub_div_text_h2 = document.createElement("h2");
loader_sub_div_text_h2.innerHTML = "We are building your box.";
$('.builder-checkout-loader-text').append(loader_sub_div_text_h2);
var loader_sub_div_text_p = document.createElement("p");
loader_sub_div_text_p.innerHTML = "This may take a few seconds...";
$('.builder-checkout-loader-text').append(loader_sub_div_text_p);
var properties_array = [];
var cart_properties = {};
var step3_products_array = {};
var steps_products_array = {};
var steparray = [];
$.each(storage_object, function(objIndex, objValue) {
var searchText = "step_";
if(objIndex.indexOf(searchText) != -1){
var curatedPrice = (objValue.curated_price) ? objValue.curated_price : '';
var objProducts = (objValue.products) ? objValue.products : [];
var objFormFields = (objValue.form_fields) ? objValue.form_fields : [];
if(objFormFields.length > 0){
$(objFormFields).each(function(objFormFieldsIndex, objFormFieldsValue) {
if(objFormFieldsValue.value){
properties_array[objFormFieldsValue.title] = objFormFieldsValue.value;
}
});
}
returnedTarget = Object.assign(cart_properties , properties_array );
if(objProducts.length > 0){
if(objIndex == 'step_3'){
$(objProducts).each(function(objProductIndex, objProductValue) {
if(curatedPrice==''){
step3_products_array = {
id: objProductValue.product_variant_id,
quantity: objProductValue.product_quantity,
properties: returnedTarget
};
steparray.push(step3_products_array);
}
});
}
else{
$(objProducts).each(function(objProductIndex, objProductValue) {
if(curatedPrice==''){
steps_products_array = {
id: objProductValue.product_variant_id,
quantity: objProductValue.product_quantity
};
steparray.push(steps_products_array);
}
});
}
}
}
});
let formData = {
'items': steparray
};
console.log(formData);
fetch('/cart/add.js', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(formData)
})
.then(response => {
console.log(response);
var c1 = setInterval(function () {
var cartContents = fetch('/cart.js')
.then(response => response.json())
.then(data => {
const c_items = [];
for (i = 0; i < data.items.length; i++) {
var final_price = Number(data.items[i].final_price);
c_items.push(final_price);
var redirect_flag = 'no';
$(c_items).each(function( index,cvalue ) {
if(cvalue <= 0)
{
redirect_flag = 'yes';
}
});
if(redirect_flag == 'no')
{
clearInterval(c1);
sweetAlertPopup('success', "Added to Cart");
$('.checkout_btn_center .custom_add_to_cart_btn').prop('disabled', false).html(add_to_cart);
$('.builder-checkout-loader-main').remove();
}
}
});
}, 500);
})
.catch((error) => {
console.error('Error:', error);
});
}
});
.banner_bg_top{padding: 140px 0px;}
.banner_bg_top:after {background: #00000096;}
.tabs-top ul {max-width: 72%;}
.tabs-top ul .active-step:before{background: #c48757 !important;}
.tabs-top ul li a b{width:50px; height:50px; border:none; background:#f4f4f4 !important;}
.tabs-top ul li a span {font-size: 13px; text-transform: uppercase; font-weight: 600; letter-spacing: .1em;}
.steps_div_with_no_prd {padding: 5px 0px; background:#f1f2f3; box-shadow:inherit;}
.product_select .product_box .popup_link img{max-height: 420px; object-fit: cover; background: #cccccc61; padding: 1px;}
.product_select .product_box img{border-radius:0px;}
.product_select .product_box{box-shadow: inherit; -webkit-box-shadow: inherit; -moz-box-shadow: inherit; text-align: center; position: relative; border-radius: 0; background: #fff; border:0px;}
.step_1 .left_accordion .panel-body_bg {background: inherit; border-radius: 0; box-shadow: inherit;}
.product_select .product_box .popup_link:after{border-radius: 0; -webkit-border-radius: 0; -moz-border-radius: 0;}
.loadmore_product_btn_main .loadmore_product_btn[data_step_index="1"]{display: none;}
.step_1 .filter_options_step .filter_button_left{background:#fff;}
.full_top_title_qe h3 span{font-size:20px;}
.step_1 .left_accordion .panel-body_bg{padding:20px;}
.left_accordion .panel-body_bg{box-shadow:inherit; padding:0px;}
.qe_tabs_bg_wrap{background:#fff;}
.steps_div_with_no_prd .title_and_reset_btn_inner h3{display:none;}
.product_select .product_box .product-title h4{font-size: 14px; font-weight: 700;}
.product_select .product_box .product_price_text{font-weight:500;}
.product_select .product_box .product_add_btn span{text-transform: uppercase; border-radius: 0;}
.form_btn_main .form_btn{border-radius: 0; -webkit-border-radius: 0; -moz-border-radius: 0;}
.step-content-section-main .form_select .section{border-radius: 0; -webkit-border-radius: 0; -moz-border-radius: 0;}
.full_top_title_qe .title_and_reset_btn_inner .back_and_next_btn .summary_backnext_btn{border-radius: 0; -webkit-border-radius: 0; -moz-border-radius: 0;}
.remodal .modal-body-inner .right-modal-information .buttons-add-and-pay .addtocart_btn{border-radius: 0; -webkit-border-radius: 0; -moz-border-radius: 0;}
.preview_steps_div .full_top_title_qe {margin-bottom:0px;}
.preview_steps_div .qe_tabs_bg_wrap{padding-top: 50px;}
.banner_bg_top .inner_banner p {color: #ffffff !important;}
.banner_bg_top .inner_banner h1 {color: #ffffff !important;}
.tabs-top ul .active-step a b{background: #c48757 !important;}
.choose_options_div .prd_quick_view{border-radius:0px; text-transform:uppercase;}
.product_select .product_box .product_add_btn .quantity_box_grid .btn_plus{border-radius:0px;}
.product_select .product_box .product_add_btn .quantity_box_grid .btn_minus {border-radius: 0;}
.full_top_title_qe {border-bottom:none; border-top: solid 1px #d4d5d673;}
.drawer_top_tabs .top_tabs_border_show .active-step:nth-child(5):before{display:none;}
.product_select .product_box .sale_1_ic {right: auto; left: 9px; top:-6px;}
.additional_information_right_bg .additional_details_tbl_grid_bg_main .checkout_btn { border-radius:0px; text-transform:uppercase; display: none;}
.custom_add_to_cart_btn { border: none; outline: none; box-shadow: inherit; cursor: pointer; font-size: 14px; font-weight: 600; display: inline-block; padding: 9px 21px; background: #c48757; color: #ffffff;}
.builder-checkout-loader-main { position: fixed; bottom: 0; background: rgba(0, 0, 0, .74); width: 100%; height: 100%; z-index: 99999;text-align: center;}
.builder-checkout-loader-main .builder-checkout-loader-sub { position: fixed;left: 0; right: 0; top: 50%; z-index: 99;transform: translateY(-50%); width: 500px; margin: 0 auto; background: #fff; padding: 25px; text-align: center; border-radius: 4px;}
.builder-checkout-loader-main .builder-checkout-loader-sub img{margin: 0 auto;}
.drawer_top_tabs .top_tabs_border_show .active-step:nth-child(4):before{display:none;}
.order_preview_sticky{margin: 0 auto; max-width: 84%;}
.full_top_title_qe .title_and_reset_btn_inner{display:inline-block; width: 100%; text-align: center; position:relative;}
.full_top_title_qe h3{display:inline-block; width:100%; text-align:center;}
.full_top_title_qe .title_and_reset_btn_inner .back_and_next_btn{position: absolute; top: 0; right: 0;}
@media only screen and (min-width:1024px) {
.product_select .product_box:hover {box-shadow: inherit; -webkit-box-shadow: inherit; -moz-box-shadow: inherit;}
}
@media only screen and (max-width:991px) {
.tabs-top ul {margin: 17px auto 27px; padding: 0 20px; max-width:100%;}
}
@media only screen and (max-width:767px) {
.banner_bg_top {padding: 60px 0px;}
.tabs-top ul li a b {width: 36px; height: 36px;}
.order_preview_sticky {max-width: 100%;}
}
@media only screen and (max-width:480px) {
}
cart